package om;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.hibernate.HibernateException;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.HibernateCallback;
import org.springframework.orm.hibernate3.HibernateTemplate;

@Entity
public class Route {
	
	@Id
	@GeneratedValue
	private Integer routeid;
	private String name;
	private String kurztxt;
	private String langtxt;
	private Float strecke;
	

	@ManyToOne(targetEntity=om.Orte.class)
	@JoinColumn(name="fs_orteid", nullable=false)
	private Orte fs_orteid;
	
	public Route(){}

	public Route(String n, Orte fs_id, String k, String l, Float s)
	{
		name = n;
		fs_orteid = fs_id;
		kurztxt = k;
		langtxt = l;
		strecke = s;
	}

	public Integer getRouteid() {
		return routeid;
	}

	public void setRouteid(Integer routeid) {
		this.routeid = routeid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getKurztxt() {
		return kurztxt;
	}

	public void setKurztxt(String kurztxt) {
		this.kurztxt = kurztxt;
	}

	public String getLangtxt() {
		return langtxt;
	}

	public void setLangtxt(String langtxt) {
		this.langtxt = langtxt;
	}

	public Float getStrecke() {
		return strecke;
	}

	public void setStrecke(Float strecke) {
		this.strecke = strecke;
	}

	public Orte getFs_orteid() {
		return fs_orteid;
	}

	public void setFs_orteid(Orte fs_orteid) {
		this.fs_orteid = fs_orteid;
	}
}